﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="frm_Unit.aspx.cs" Inherits="Mod_InitFile_frm_Unit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="Head1" runat="server">
        <title></title>
        <script language="javascript" src="../App_script/index.js"></script>
        <link type="text/css" rel="stylesheet" href="../App_Css/css1.css"/>
    </head>
    <body rightmargin="0" topmargin="0" bottommargin="0" leftmargin="0" onresize="ChangDivWidth()" onkeydown="FocusChangNext()">
        <form id="UnitPage" runat="server">
            <input type="hidden" id="hidIndex" runat="server" style="width:0; height:0">
            <!-- 下拉子菜单 Begin -->
            <div id="divChildMenu" align="center" style="border-right: #cdccc1 1px solid; visibility:hidden; border-top: #cdccc1 1px solid; left: 551px; border-left: #cdccc1 1px solid; width: 120px; border-bottom: #cdccc1 1px solid; position: absolute; top: 31px; height: 40px; background-color: #e8e8e3">
                <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%" class="text">
                    <tr onmouseover="ChangTrBgColor(this, '#D3E2D7')" onmouseout="ChangTrBgColor(this, '')">
                        <td width="20%" align="center" style="height: 18px"></td>
                        <td width="80%" align="left" style="height: 18px">
                            <asp:linkbutton ID="lbtnDelete0" CommandName="1" OnClick="lbtnDelete_Click" runat="server" Text="作   废" Font-Overline="False" ForeColor="#4E4E4E"/>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" style="height: 1px"><hr style="width: 101px" /></td>
                    </tr>
                    <tr onmouseover="ChangTrBgColor(this, '#D3E2D7')" onmouseout="ChangTrBgColor(this, '')">
                        <td width="20%" align="center" style="height: 25px"></td>
                        <td width="80%" align="left" style="height: 25px">
                            <asp:linkbutton ID="lbtnDelete1" Enabled=false CommandName="-1" OnClick="lbtnDelete_Click" runat="server" Text="彻底作废" Font-Overline="False" ForeColor="#4E4E4E"/>
                        </td>
                    </tr>
                </table>
            </div>
            <!-- 下拉子菜单 End -->
            <table align="center" width="100%" height="449" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td height="35" align="right" background="../App_Images/b_12.gif">
                        <!-- 操作工具条 Begin -->
                        <table width="820" height="35" cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <asp:Panel ID="panPrint" Visible="false" runat="server">
                                <td width="120">
                                    <table width="100" height="25" cellpadding="0" cellspacing="0"  border="0">
                                        <tr>
                                            <td align="center" width="70"><asp:ImageButton ID="ibtnPrint" ImageUrl="../App_Images/b_52_1.gif" onmouseover="ChangImage(this, '../App_Images/b_52_2.gif')" onmouseout="ChangImage(this, '../App_Images/b_52_1.gif')" runat="server" /></td>
                                        </tr>
                                    </table>
                                </td>
                                </asp:Panel>
                                <td>&nbsp;</td>
                                <td width="1">
                                    <input type="hidden" id="hidButtonEdit" runat="server" style="width:0; height:0;">
                                    <input type="hidden" id="hidButtonOAudit" runat="server" style="width:0; height:0;">
                                </td>
                                <asp:Panel ID="panAdd" Visible="false" runat="server">
                                <td width="100">
                                    <table width="100" height="25" cellpadding="0" cellspacing="0"  border="0">
                                        <tr>
                                            <td align="center" width="100"><asp:imagebutton runat="server" id="imgAdd"  ImageUrl="../App_Images/b_18_1.gif" onmouseover="ChangImage(this, '../App_Images/b_18_2.gif')" onmouseout="ChangImage(this, '../App_Images/b_18_1.gif')" OnClick="imgAdd_Click"/></td>
                                        </tr>
                                    </table>
                                </td>
                                </asp:Panel>
                                <asp:Panel ID="panRef" Visible="false" runat="server">
                                <td width="100">
                                    <table width="100" height="25" cellpadding="0" cellspacing="0"  border="0">
                                        <tr>
                                            <td align="center" width="70"><asp:imagebutton id="imgRef" runat="server" ImageUrl="../App_Images/b_20_1.gif" onmouseover="ChangImage(this, '../App_Images/b_20_2.gif')" onmouseout="ChangImage(this, '../App_Images/b_20_1.gif')" OnClick="imgRef_Click" /></td>
                                            <td align="center" width="30"><img src="../App_Images/b_25.gif" height="25" width="1"/></td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                                <asp:Panel ID="panAudit" Visible="false" runat="server">
                                <td width="100">
                                    <table width="100" height="25" cellpadding="0" cellspacing="0"  border="0">
                                        <tr>
                                            <td align="center" width="70"><asp:ImageButton ID="ibtnAudit" OnClick="UpDateUnitInfo" CommandName="1" ImageUrl="../App_Images/b_21_1.gif" onmouseover="ChangImage(this, '../App_Images/b_21_2.gif')" onmouseout="ChangImage(this, '../App_Images/b_21_1.gif')" runat="server" /></td>
                                            <td align="center" width="30"><img src="../App_Images/b_25.gif" height="25" width="1"/></td>
                                        </tr>
                                    </table>
                                </td>
                                </asp:Panel>
                                <asp:Panel ID="panDelete" Visible="false" runat="server">
                                <td width="130">
                                    <table width="130" height="25" cellpadding="0" cellspacing="0"  border="0">
                                        <tr>
                                            <td align="center" width="70"><asp:ImageButton ID="ibtnDelete0" CommandName="1" ImageUrl="../App_Images/b_19_1.gif" onmouseover="ChangImage(this, '../App_Images/b_19_2.gif');ChangImage(document.all.imgDelete, '../App_Images/b_19_3.gif')" onmouseout="ChangImage(this, '../App_Images/b_19_1.gif');ChangImage(document.all.imgDelete, '../App_Images/b_19_4.gif')" runat="server" OnClick="ibtnDelete0_Click" /></td>
                                            <td align="center" width="17"><img id="imgDelete" src="../App_Images/b_19_4.gif" style="cursor:hand" onmouseover="ChangImage(this, '../App_Images/b_19_3.gif');ChangImage(document.all.ibtnDelete0, '../App_Images/b_19_2.gif')" onmouseout="ChangImage(this, '../App_Images/b_19_4.gif');ChangImage(document.all.ibtnDelete0, '../App_Images/b_19_1.gif')" onclick="ChildMenuVisible()" /></td>
                                            <td align="center" width="43"><img src="../App_Images/b_25.gif" height="25" width="1"/></td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                                <asp:Panel ID="panSearch" Visible="false" runat="server">
                                <td width="130">
                                    <table width="130" height="18" cellpadding="0" cellspacing="0"  border="1" bordercolor="#a1a7bb" style="border-collapse: collapse">
                                        <tr>
                                            <td width="17"><img src="../App_Images/ico/5.gif" border="0" width="17" height="17" /></td>
                                            <td width="77"><asp:TextBox ID="txtKey" runat="server" Width="68px" BorderWidth="0px" Height="15px" onmousedown="this.value=''" onmouseover="this.select()" CssClass="text" Text="查询关键字" /></td>
                                            <td width="36"><asp:ImageButton ID="ibtnSearch" runat="server" ImageUrl="../App_Images/b_21.gif" Width="36" Height="18" OnClick="ibtnSearch_Click" /></td>
                                        </tr>
                                    </table>
                                </td>
                                </asp:panel>
                                <td width="10">&nbsp;</td>
                            </tr>
                        </table>
                        <!-- 操作工具条 End -->
                    </td>
                </tr>
                <tr>
                    <td height="25" align="left">
                        <!-- 翻页控制 Begin -->
                        <table width="820" height="25" cellpadding="0" cellspacing="0" border="1" class="text" bordercolor="#a1a7bb" style="border-collapse: collapse">
                            <tr>
                                <td align="center">
                                    <asp:Label ID="lblRsCounts" runat="server" CssClass="text"/>
                                    <asp:Label ID="lblPageCounts" runat="server" CssClass="text"/>
                                    <asp:Label ID="lblCurrPage" runat="server" CssClass="text"/>&nbsp;&nbsp;
                                    <asp:linkbutton ID="lbtnFirst" runat="server" CssClass="text" Text="首  页" OnClick="ChangPage" CommandName="0" />
                                    <asp:linkbutton ID="lbtnPrev" runat="server" CssClass="text" Text="上一页" OnClick="ChangPage" CommandName="1" />
                                    <asp:linkbutton ID="lbtnNext" runat="server" CssClass="text" Text="下一页" OnClick="ChangPage" CommandName="2" />
                                    <asp:linkbutton ID="lbtnEnd" runat="server" CssClass="text" Text="尾  页" OnClick="ChangPage" CommandName="3" />&nbsp;&nbsp;
                                    <asp:Label ID="lblGoTxt1" runat="server" CssClass="text" Text="跳转到"/>
                                    <asp:textBox ID="txtGo" onmouseover="this.select()" runat="server" CssClass="text" Height="13px" Width="18px" BorderColor="#7F9DB9" BorderWidth="1px" MaxLength="5"  AutoPostBack="True" OnTextChanged="txtGo_TextChanged"/>
                                    <asp:Label ID="lblGoTxt2" runat="server" CssClass="text" Text="页"/>
                                </td>
                            </tr>
                        </table>
                        <!-- 翻页控制 End -->
                    </td>
                </tr>
                <tr>
                    <td height="439" valign="top">
                        <div id="divShowResult" style="overflow: auto; width: 820px; height: 447px; border-right: #a1a7bb 1px solid; border-top: #a1a7bb 1px solid;">
                        <table width="1000" height="25" cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td>
                                    <table width="1000" height="25" cellspacing="0" cellpadding="0" border="1" class="text" bordercolor="#a1a7bb" style="border-collapse: collapse">
                                        <tr style="cursor:default">
                                            <td align="center" background="../App_Images/b_17.gif" style="font-weight: bold; color: #183184; height: 25px; width: 60px;">操作</td>
                                            <td align="center" background="../App_Images/b_17.gif" style="font-weight: bold; color:red ; height: 25px; width: 90px;">编号</td>
                                            <td align="center" background="../App_Images/b_17.gif" style="font-weight: bold; color: red; height: 25px; width: 80px;">单位名称</td>
                                            <td align="center" background="../App_Images/b_17.gif" style="font-weight: bold; color: #183184; height: 25px; width: 120px;">是否基本计量单位</td>
                                            <td align="center" background="../App_Images/b_17.gif" style="font-weight: bold; color: red; height: 25px; width: 80px;">计量单位率</td>
                                            <td align="center" background="../App_Images/b_17.gif" style="font-weight: bold; color: #183184; height: 25px; width: 120px;">是否统计计量单位</td>
                                            <td align="center" background="../App_Images/b_17.gif" style="font-weight: bold; color: #183184; height: 25px; width: 100px;">计量单位</td>
                                            <td align="center" background="../App_Images/b_17.gif" style="font-weight: bold; color:Gray ; height: 25px; width: 80px;">录入人</td>
                                            <td align="center" background="../App_Images/b_17.gif" style="font-weight: bold; color:Gray  ; height: 25px; width: 80px;">录入日期</td>
                                            <td align="center" background="../App_Images/b_17.gif" style="font-weight: bold; color: #183184; height: 25px;">备注</td>
                                        </tr>
                                        <!-- 添加新记录面板 Begin  -->
                                        <asp:panel ID="panAddRs" runat="server" Visible="false">
                                        <tr id="trAdd"  height="25" bgcolor="#E9F0EB">
                                            <td align="center" background="../App_Images/b_23.gif">
                                                <asp:imagebutton id="imgCancel" imageurl="../App_Images/ico/4.gif" ToolTip="取消新增" runat="server" OnClick="imgCancel_Click" OnClientClick="return confirm('您真的要取消新增吗？');" />&nbsp;
                                                <asp:ImageButton ID="ibtnServer" OnClick="AddUnitInfo" ImageUrl="../App_Images/ico/11.gif" ToolTip="保存新增" runat="server" />
                                            </td>
                                            <td align="center" style="width: 90px"><asp:textbox ID="labId" ToolTip="编号" runat="server" cssclass="text" Width="80" BackColor="transparent" BorderColor="#7F9DB9" BorderWidth="1px"/></td>
                                            <td align="center" style="width: 80px"><asp:TextBox ID="txt2" ToolTip="单位名称" runat="server" CssClass="text"  Width="70px" BackColor="Transparent"  BorderColor="#7F9DB9" BorderWidth="1px"></asp:TextBox></td>
                                            <td align="center" style="width: 120px">
                                                <asp:DropDownList ID="TextBox1" AutoPostBack="true" OnSelectedIndexChanged="ChangStateByAdd" runat="server" CssClass="text" Width="110px" BackColor="Transparent" style="cursor:hand">
                                                    <asp:ListItem Value=0 >是</asp:ListItem>
                                                    <asp:ListItem Value=1 Selected="True">否</asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                            <td align="center" style="width: 80px"><asp:TextBox ID="TextBox2" ToolTip="计量单位率" Text="1" runat="server" CssClass="text" MaxLength="50" Width="70px" BackColor="Transparent"  BorderColor="#7F9DB9" BorderWidth="1px"></asp:TextBox></td>
                                            <td align="center" style="width: 120px">
                                                <asp:DropDownList ID="TextBox3" runat="server" CssClass="text" Width="110px" BackColor="Transparent" style="cursor:hand">
                                                    <asp:ListItem Value=0 Selected="True">是</asp:ListItem>
                                                    <asp:ListItem Value=1>否</asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                            <td align="center" style="width: 100px">
                                                <asp:DropDownList ID="TextBox4" runat="server" CssClass="text" Width="95px" BackColor="Transparent" style="cursor:hand">
                                                </asp:DropDownList>
                                            </td>
                                            <td align="center" style="width: 80px"><asp:TextBox ID="txt5" runat="server" CssClass="text" MaxLength="50" ReadOnly="True" Width="70px" BackColor="Transparent" BorderWidth="0px"></asp:TextBox></td>
                                            <td align="center" style="width: 80px"><asp:TextBox ID="txt6" runat="server" CssClass="text" MaxLength="50" ReadOnly="True" Width="60px" BackColor="Transparent" BorderWidth="0px"></asp:TextBox></td>
                                            <td align="center"><asp:TextBox ID="txt9" Width="160" runat="server" CssClass="text" MaxLength="255" BackColor="Transparent" BorderColor="#7F9DB9" BorderWidth="1px" onkeydown="ButtonSubmit('ibtnServer')"></asp:TextBox></td>
                                        </tr>
                                       </asp:panel>
                                       <!-- 添加新记录面板 End -->
                                    </table>
                                </td>
                            </tr>
                            <!-- 记录显示区 Begin -->
                            <tr>
                                <td style="height: 359px" valign="top">
                                    <asp:datagrid ID="dgrdResult" runat="server" AllowPaging="True" AutoGenerateColumns="False" PageSize="18" ShowHeader="False" Width="900" BorderStyle="None" BorderWidth="0px" CellPadding="0" CssClass="text" OnItemDataBound="dgrdResult_ItemDataBound">
                                        <PagerStyle Visible="False" BorderStyle="None" BorderWidth="0px" />
                                        <Columns>
                                            <asp:TemplateColumn>
                                                <ItemTemplate>
                                                    <table width="1000" height="20" cellpadding="0" cellspacing="0" border="1" bordercolor="#A1A7BB" style="border-collapse: collapse">
                                                        <tr id='tr' runat="server">
                                                            <td align="center" width="60" background="../App_Images/b_23.gif">
                                                                <asp:CheckBox ID="chkSelect" onclick="ChangTrBgColorByDataGrid(this, 'tr', 'chkSelect')" style="cursor:hand" Visible="true" runat="server" />
                                                                <asp:imagebutton ID="ibtnEdit" OnClick="UpDateUnitInfo" CommandName="2" CommandArgument="<%# Container.ItemIndex %>" ToolTip="编辑" Height="17" Width="17" Visible="false" ImageUrl="../App_Images/ico/12.gif" runat="server" />
                                                                <asp:ImageButton ID="ibtnCan" OnClick="UpDateUnitInfo" CommandName="3" CommandArgument="<%# Container.ItemIndex %>" ToolTip="取消编辑" Height="17" Width="17" Visible="false" ImageUrl="../App_Images/ico/4.gif" runat="server" OnClientClick="return confirm('您真的要取消编辑吗？')" />
                                                                <asp:ImageButton ID="ibtnSer" OnClick="UpDateUnitInfo" CommandName="4" CommandArgument="<%# Container.ItemIndex %>" ToolTip="保存编辑" Height="17" Width="17" Visible="false" ImageUrl="../App_Images/ico/11.gif" runat="server" />
                                                                <asp:imagebutton ID="ibtnOAudit" OnClick="UpDateUnitInfo" CommandName="0" CommandArgument="<%# Container.ItemIndex %>" ToolTip="取消确认" Height="17" Width="17" Visible="false" ImageUrl="../App_Images/ico/8.gif" runat="server" OnClientClick="return confirm('您真的要取消确认该条信息吗？')" />
                                                            </td>
                                                            <td align="center" width="90px"><asp:TextBox ID="nt_id" ToolTip="编号" Text='<%# DataBinder.Eval(Container.DataItem,"nt_id")%>' runat="server" Width="80px" CssClass="text" MaxLength="20" ReadOnly="True" BackColor="Transparent" BorderWidth="0px"></asp:TextBox></td>
                                                            <td align="center" width="80px"><asp:TextBox ID="nt_name" ToolTip="单位名称" BorderColor="#7F9DB9" Text='<%# DataBinder.Eval(Container.DataItem, "nt_name")%>' runat="server" CssClass="text" MaxLength="50" Width="70px" ReadOnly="True" BackColor="Transparent" BorderWidth="0px"></asp:TextBox></td>
                                                            <td align="center" width="120px">
                                                                <asp:TextBox ID="TextBox5" BorderColor="#7F9DB9" Text='<%# DataBinder.Eval(Container.DataItem, "nt_is_basicunit")%>' ToolTip='<%# DataBinder.Eval(Container.DataItem, "nt_is_basicunit")%>' runat="server" CssClass="text" MaxLength="50" Width="110px" ReadOnly="True" BackColor="Transparent" BorderWidth="0px"></asp:TextBox>
                                                                <asp:DropDownList ID="TextBox5N" AutoPostBack="true" OnSelectedIndexChanged="ChangStateByUpdate"  Visible="false" runat="server" CssClass="text" Width="110" BackColor="Transparent" style="cursor:hand">
                                                                    <asp:ListItem Value=0>是</asp:ListItem>
                                                                    <asp:ListItem Value=1>否</asp:ListItem>
                                                                </asp:DropDownList>
                                                            </td>
                                                            <td align="center" width="80px"><asp:TextBox ID="TextBox6" ToolTip="计量单位率" BorderColor="#7F9DB9" Text='<%# DataBinder.Eval(Container.DataItem, "nt_basicpercent")%>' runat="server" CssClass="text" MaxLength="50" Width="70px" ReadOnly="True" BackColor="Transparent" BorderWidth="0px"></asp:TextBox></td>
                                                            <td align="center" width="120px">
                                                                <asp:TextBox ID="TextBox7" BorderColor="#7F9DB9" Text='<%# DataBinder.Eval(Container.DataItem, "nt_isaccountunit")%>' ToolTip='<%# DataBinder.Eval(Container.DataItem, "nt_isaccountunit")%>' runat="server" CssClass="text" MaxLength="50" Width="110px" ReadOnly="True" BackColor="Transparent" BorderWidth="0px"></asp:TextBox>
                                                                <asp:DropDownList ID="TextBox7N"  Visible="false" runat="server" CssClass="text" Width="110" BackColor="Transparent" style="cursor:hand">
                                                                    <asp:ListItem Value=0 Selected="True">是</asp:ListItem>
                                                                    <asp:ListItem Value=1>否</asp:ListItem>
                                                                </asp:DropDownList>
                                                            </td>
                                                            <td align="center" width="100px">
                                                                <asp:TextBox ID="TextBox8" BorderColor="#7F9DB9" Text='<%# DataBinder.Eval(Container.DataItem, "nt_basicunit")%>' ToolTip='<%# DataBinder.Eval(Container.DataItem, "nt_basicunit")%>' runat="server" CssClass="text" MaxLength="50" Width="90px" ReadOnly="True" BackColor="Transparent" BorderWidth="0px"></asp:TextBox>
                                                                <asp:DropDownList ID="TextBox8N"  Visible="false" runat="server" CssClass="text" Width="95" BackColor="Transparent" style="cursor:hand">
                                                                </asp:DropDownList>
                                                            </td>
                                                            <td align="center" width="80px"><asp:TextBox ID="oper" Text='<%# DataBinder.Eval(Container.DataItem, "oper")%>' ToolTip='<%# DataBinder.Eval(Container.DataItem, "oper")%>' runat="server" CssClass="text" MaxLength="50" ReadOnly="True" Width="70px" BackColor="Transparent" BorderWidth="0px"></asp:TextBox></td>
                                                            <td align="center" width="80"><asp:TextBox ID="oper_date" Text='<%# DataBinder.Eval(Container.DataItem, "oper_date")%>' ToolTip='<%# DataBinder.Eval(Container.DataItem, "oper_date")%>' runat="server" CssClass="text" MaxLength="50" ReadOnly="True" Width="60" BackColor="Transparent" BorderWidth="0px"></asp:TextBox></td>
                                                            <td align="center"><asp:TextBox ID="remark" Width="160" BorderColor="#7F9DB9" Text='<%# DataBinder.Eval(Container.DataItem, "remark")%>' ToolTip='<%# DataBinder.Eval(Container.DataItem, "remark")%>' runat="server" CssClass="text" MaxLength="255" ReadOnly="True" BackColor="Transparent" BorderWidth="0px"></asp:TextBox></td>
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:BoundColumn DataField="is_audit" ReadOnly="True" Visible="False"></asp:BoundColumn>
                                            <asp:BoundColumn DataField="nt_is_basicunit" ReadOnly="True" Visible="False"></asp:BoundColumn>
                                            <asp:BoundColumn DataField="nt_isaccountunit" ReadOnly="True" Visible="False"></asp:BoundColumn>
                                            <asp:BoundColumn DataField="nt_basicunit" ReadOnly="True" Visible="False"></asp:BoundColumn>
                                        </Columns>
                                        <ItemStyle BorderStyle="None" BorderWidth="0px" />
                                        <AlternatingItemStyle BackColor="#EEEFF2" />
                                    </asp:datagrid>
                                </td>
                            </tr>
                            <!-- 记录显示区 End -->
                        </table>
                        </div>
                    </td>
                </tr>
            </table>
            <asp:label ID="lblJs" runat="server"/>
        </form>
    </body>
</html>
